#include<stdio.h>
#include<conio.h>
#include<graphics.h>
int main()
{
	initgraph(600,400);
	setbkcolor(RGB(191,191,191));
	cleardevice();
	int i,x,y;
	float pi=3.14159;
	int r=100;

	while(1)
	{
	for(x=1;x<=3;x++)
	{
		for(y=1;y<=2;y++)
		{
			int centerx=200*x-100;
			int centery=200*y-100;
	
			setlinecolor(RED);
			circle(centerx,centery,r);
			float a=0;
			float b=0;

			float h=rand()%180;
			COLORREF color1=HSVtoRGB(h,0.9,0.8);
			COLORREF color2=HSVtoRGB(h+180,0.9,0.8);

			for(r=100;r>0;r=r-10)
			{
				int x1=centerx-r;
				int y1=centery-r;
				int x2=centerx+r;
				int y2=centery+r;
		

				for(i=0;i<20;i++)
				{
					a=i*pi/10+b;
					setfillcolor(color1);	
					solidpie(x1,y1,x2,y2,a,2*pi/60+a);
					setfillcolor(RGB(255,255,255));
					solidpie(x1,y1,x2,y2,2*pi/60+a,3*pi/60+a);
					setfillcolor(color2);
					solidpie(x1,y1,x2,y2,3*pi/60+a,5*pi/60+a);
					setfillcolor(RGB(0,0,0));
					solidpie(x1,y1,x2,y2,5*pi/60+a,6*pi/60+a);
			
				}
				b=b+pi/20;
			}
		}
	}
	_getch();
	}
	return 0;
}